package Model;

import java.util.Date;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlTransient;

/*
 * Camera class represents camera with all its technical characteristics
 */
public class Camera {
    
    private int serialNumber;
    private String alias;
    private String type;
    private String ip;
    private int port;  
    //Date of last update
    private Date lastUpdated;
    private int posXMax;
    private int posXMin;
    private int posYMax;
    private int posYMin;
    private int posZMax;
    private int posZMin;
    private int tiltPosMax;
    private int tiltPosMin;
    private int slidePosMax;
    private int slidePosMin;
    private int cranePosXMax;
    private int cranePosXMin;
    private int cranePosYMax;
    private int cranePosYMin;

    
    /**
     * Empty constructor
     */
    public Camera() { }
    
    /**
     * Set & Get methods
     * 
     */

    @XmlTransient
    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    @XmlTransient
    public int getCranePosXMax() {
        return cranePosXMax;
    }

    public void setCranePosXMax(int cranePosXMax) {
        this.cranePosXMax = cranePosXMax;
    }

    @XmlTransient
    public int getCranePosXMin() {
        return cranePosXMin;
    }

    public void setCranePosXMin(int cranePosXMin) {
        this.cranePosXMin = cranePosXMin;
    }

    @XmlTransient
    public int getCranePosYMax() {
        return cranePosYMax;
    }

    public void setCranePosYMax(int cranePosYMax) {
        this.cranePosYMax = cranePosYMax;
    }

    @XmlTransient
    public int getCranePosYMin() {
        return cranePosYMin;
    }

    public void setCranePosYMin(int cranePosYMin) {
        this.cranePosYMin = cranePosYMin;
    }

    @XmlTransient
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @XmlTransient
    public Date getLastUpdated() {
        return lastUpdated;
    }

    public void setLastUpdated(Date lastUpdated) {
        this.lastUpdated = lastUpdated;
    }

    @XmlTransient
    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    @XmlTransient
    public int getPosXMax() {
        return posXMax;
    }

    public void setPosXMax(int posXMax) {
        this.posXMax = posXMax;
    }

    @XmlTransient
    public int getPosXMin() {
        return posXMin;
    }

    public void setPosXMin(int posXMin) {
        this.posXMin = posXMin;
    }

    @XmlTransient
    public int getPosYMax() {
        return posYMax;
    }

    public void setPosYMax(int posYMax) {
        this.posYMax = posYMax;
    }

    @XmlTransient
    public int getPosYMin() {
        return posYMin;
    }

    public void setPosYMin(int posYMin) {
        this.posYMin = posYMin;
    }

    @XmlTransient
    public int getPosZMax() {
        return posZMax;
    }

    public void setPosZMax(int posZMax) {
        this.posZMax = posZMax;
    }

    @XmlTransient
    public int getPosZMin() {
        return posZMin;
    }

    public void setPosZMin(int posZMin) {
        this.posZMin = posZMin;
    }
    
    @XmlAttribute(name="serialNumber")
    public int getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(int serialNumber) {
        this.serialNumber = serialNumber;
    }

    @XmlTransient
    public int getSlidePosMin() {
        return slidePosMin;
    }

    public void setSlidePosMin(int slidPosMin) {
        this.slidePosMin = slidPosMin;
    }

    @XmlTransient
    public int getSlidePosMax() {
        return slidePosMax;
    }

    public void setSlidePosMax(int slidePosMax) {
        this.slidePosMax = slidePosMax;
    }

    @XmlTransient
    public int getTiltPosMax() {
        return tiltPosMax;
    }

    public void setTiltPosMax(int tiltPosMax) {
        this.tiltPosMax = tiltPosMax;
    }

    @XmlTransient
    public int getTiltPosMin() {
        return tiltPosMin;
    }

    public void setTiltPosMin(int tiltPosMin) {
        this.tiltPosMin = tiltPosMin;
    }

    @XmlTransient
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
/**
     * 
     * @return string representation of the camera object
     */
    @Override
    public String toString() {
        return alias+":"+serialNumber;
    }
    
    
}
